<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:36:"./views/home/mobile/task/index.phtml";i:1627622930;s:71:"/www/wwwroot/10.168.1.202/public/views/home/mobile/common/ufooter.phtml";i:1625675066;}*/ ?>
<!DOCTYPE html>
<html lang="en" style="font-size: 100px;background-color:#000">
<head>
    <meta charset="UTF-8">
    <title>任务中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="Cache-Control" content="private">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">

    <link rel="stylesheet" href="/static/home/mobile/css/bootstrap.css">
    <link rel="stylesheet" href="/static/home/mobile/css/font-awesome.min.css">
    <link href="/static/home/mobile/css/reset_5.css" rel="stylesheet" type="text/css" />
    <link href="/static/home/mobile/css/style.css?v=21019" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/new_page.css?v=2" />
    <link rel="stylesheet" href="/static/home/mobile/css/swiper.min.css" />
    <link rel="stylesheet" href="/static/home/mobile/js/index/flexslider.min.css" />
    <link rel="stylesheet" href="/static/home/mobile/js/index/index.css?v=1">
    <link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
    <link rel="stylesheet" href="/static/home/mobile/css/mui.min.css">


    <script src="/static/home/mobile/js/jquery.min.js"></script>
    <script src="/static/home/mobile/js/mui.min.js"></script>
    <link rel="stylesheet" href="/static/home/mobile/js/index/index.css?v=1">
    <style>
        html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img {
            margin: 0;
            padding: 0;
        }
        html{
            font-size: 100px;
        }
        fieldset, img {
            border: none;
        }

        address, caption, cite, code, dfn, th, var {
            font-style: normal;
            font-weight: normal;
        }
        ul, ol {
            list-style: none;
        }
        body {
            font: 12px/20px "微软雅黑", "SimSun", "宋体", "Arial Narrow", HELVETICA;
            overflow-x: hidden;
        }
        i {
            font-style: normal;
        }
        a{
            color: #666;
            text-decoration: none;
        }

        a:link{
            color: #666;
        }

        a:visited {
            color: #666;
        }
        a:hover, a:active, a:focus {
            /*color: #f96a22;*/
            color: #666;
            /*text-decoration: underline;*/
        }
      #footer-bar li b {
    font-weight:normal
}

        a,a:hover,a:active,a:visited,a:link,a:focus{
            -webkit-tap-highlight-color:rgba(0,0,0,0);
            -webkit-tap-highlight-color: transparent;
            outline:none;
            background: none;
            text-decoration: none;
        }

        input {
            outline: none
        }
        .shade {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, .5);
            display: none;
        }
        button {
            outline: none;
        }
        .header{
            display: flex;
            justify-content: space-between;
            background-color: #f96a22;
            align-items: center;
            width: 100%;
            height: .88rem;
            padding: 0 .24rem;

            box-sizing: border-box;
        }

        .header-left{
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 16px;
        }

        .left-itme{
            color: #f96a22;
            margin-right: .14rem;
            font-size: 16px;
            position: relative;
        }

        .select-header{
            color: #f96a22;
            font-weight: bold;
        }

        .right{
            position: relative;
            width:90%;
            margin:0 auto;
        }

        .right input{
            width: 100%;
            height: .48rem;
            padding-left: .56rem;
            border: 1px solid rgba(0,0,0,.1);
            border-radius: .1rem;
            box-sizing: border-box;
        }

        .search-img {
            width: .38rem;
            height: .38rem;
            position: absolute;
            top: .20rem;
            left: 6%;
        }
        .content{
          background-color:#000;}
        input::-ms-input-placeholder{
            font-size: 14px;
            color: #999;
        }
        input::-webkit-input-placeholder{
            font-size: 14px;
            color: #999;
        }
      .mui-scroll-wrapper{
        background-color:#000;
        width:95%;
        left:0.1
      }

        .tab-wrap {
            width: 100%;
            height: .68rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: .14rem 0;
            border-top: 1px solid rgba(0,0,0,.05);
            position: relative;
          background-color:white;
        }

        .tab-wrap .tab-item{
            width: 50%;
            height: 100%;
            font-size: 16px;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }

        .tab-title{
            width: 100%;
            height: .68rem;
            line-height: .68rem;
            text-align: center;
            border-right: 1px solid rgba(0,0,0,.08);
            position: relative;
        }
      .tab-title-one{
            border-top-color:#FFAB42 !important;
            color: #FFAB42 !important;
      }
        .tab-title::after{
            content: '';
            width: 0;
            height: 0;
            border: 6px solid transparent ;
            border-top-color:#B0B0B0 ;
            position: absolute;
            top: .3rem;
            margin-left: .08rem;
            color:#FFAB42 !important;
        }

        .tab-wrap .tab-item .tab-list{
            width: 100%;
            margin-top: -8px;
            position: absolute;
            top: .68rem;
            left: 0;
            background: white;
            border-top: 1px solid rgba(0,0,0,.08);
            box-shadow: 0 .05rem .05rem rgba(0,0,0,.03);
            z-index: 100000;
        }

        .tab-wrap .tab-item .tab-list li {
            width: 100%;
            line-height: .48rem;
            color: #666;
            padding: .14rem .24rem;
            border-bottom: 1px solid rgba(0,0,0,.08);
            box-sizing: border-box;
        }

        .tab-wrap .tab-item .tab-list li a{
            display: block;
            width: 100%;
            line-height: .48rem;
        }

        .tab-wrap .tab-item .tab-list .tab-select{
            color:#FFAB42;
            font-weight: bolder;
            background-image:url('/static/home/mobile/images/select-ordercat.png');
            background-size:6%;
            background-repeat:no-repeat;
            background-position:right center;
        }

        .cueText{
            text-align: center;
            font-size: 14px;
            color: #666;
        }

        #downRefresh{
            width: 100%;
            height: 80vh;
        }

        .hidetr{
            display: none;
        }
        .pull-loading {
            text-align: center;
            height: 40px;
            line-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #scroller ul li {
            padding: 20px 10px;
            border-bottom: solid 1px #ccc;
            background: #fff;
        }
        .hidetr{
            display: none;
        }
        .mui-pull-caption{
            text-align: center;
        }
        .mui-scroll-wrapper{
            top:110px;
            bottom:63px;
            left:0.15rem !important;
        }
        .right input{
            margin-bottom: 7px;
            margin-top: 7px;
        }
      .mui-scrollbar {
                     display: none !important;
        }
        .img-home{
            width: 100%;
            height: auto;
        }
        .span_alink{
            position: relative;
            width: 100%;
            height: 100%;
            background-color: red !important;
            display: block;
            margin: 0 auto;
            vertical-align: middle;
            text-align: center;
            clear: both;
        }
        .span_alink span{
            display: block;
            color: white;
            font-size: 14px;
            line-height: 35px;
            text-align: center;
        }
        .list-id-span{
            color:#999999;
            font-size:14px;
            margin-left: 5px;
          }
          .yellow-new{
            background:#2f62ff;
            color:#fff !important;
            border-color:#2f62ff !important;
            line-height: 14px;
           
          	
          }
          .blue-new{
          	 line-height: 12px;
            background:#2f62ff;
            color:#fff !important;
         
             border-color:#2f62ff !important;
          }
          .red-new{
            background:#ffffff !important;
            border-color:#FECB9D !important;
            color:#FE7E24 !important;
          }
          .red-new img{
             width:15px;
             height:15px;
             line-height:18px;
             margin-right:5px;
          }

      .back {
            float: left;
            background: url(/static/home/mobile/images/return.png) no-repeat;
            background-size: 9px 21px;
            margin-top: 20px;
            height: 37px;
            width: 37px;
        }

 .top-task{
    background:#000;
        position: relative;
        height:50px;
        z-index:110;
 }
 .top-task li {
    position: relative;
    width: 16%;
    margin-left: 4.5%;
    margin-right: 4.5%;
    color:#ffffff;
    height: 50px;
    line-height: 50px;
    float: left;
    font-size: 17px;
    text-align: center;
}
 .top-task li.active {
    width: 16%;
    margin-left: 4.5%;
    margin-right: 4.5%;
    border-bottom: 2px solid #f96a22
    background:none;
}

 .top-task2{
    background:#000;
        position: relative;
        height:50px;
    border-bottom:1px solid #504c4c;
            z-index:110;
 }
 .top-task2 li {
    position: relative;
    width: 21%;
    margin-left: 2%;
    margin-right:2%;
    height: 50px;
    line-height: 50px;
    float: left;
    font-size: 16px;
    text-align: center;
    color: #fff;
}
 .top-task2 li.active {
/*     border-bottom: 2px solid #f96a22; */
    background:none;
    color:#2F62FF;
}

 .top-task3{
    background:#000;
    position: relative;
    position:fixed;
    top:100px;
    left:0;
    z-index: 100;
    width:100%;
    z-index:110;
 }

 .top-task3 li {
    background:#000;
    position: relative;
    width: 16%;
    margin-left: 4.5%;
    margin-right: 4.5%;
    margin-bottom: 10px;
    height: 50px;
    line-height: 50px;
    float: left;
    font-size: 17px;
    text-align: center;

}
 .top-task3 li span{
     width: 100%;
     height: 40px;
     line-height: 40px;
     margin-bottom: 10px;
     background: #2f62ff;
    display: block;
    border-radius: 5px;
    color: #ffffff;
 }
 .top-task3 li.active{
    color:#f96a22;
    border-bottom:2px solid #fff;
 }
 .top-task3 li.active:after {
    content:'√';
}
.list-block li {
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 3px;
    position: relative;
border: 1px solid #423b3b;
background: #1a1a1a;
        width: 49%;
    display: inline-block;
    border-radius: 5px;
}
.list-block li a .subtitle {
    color: #fff;
    display: block;
    overflow: hidden;
    height: 26px;
    line-height: 39px;
}
.list-block li .desc {
    color: #fff;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    margin-bottom: 0px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#footer-bar {
    width: 100%;
    background-color: #000;
    position: fixed;
    bottom: 0px;
    height: 54px;
    padding: 0px 0 0 0;
    margin: 0px;
    text-align: center;
    border-top: 1px solid #504c4c;
    z-index: 999;
}
#footer-bar li b {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #fff;
    padding-top: 2px;
}
.list-block li .money {
    color: #ff6700;
    position: unset;
    font-size: 3.33333333333333vw;
}
.list-block li a.title {
    padding-left: 60px;
}
.list-block li .keywords span{border-radius:10px;font-size:11px;}
.index_list li{margin-left:0px !important;margin-right:0px !important;width:calc(50% - 5px) !important}
.index_list li:nth-child(even){margin-left:10px !important;}
</style>

</head>
<body style="background:#ffffff">
<div style="background:#000000">
<div class="top-task" style="overflow:hidden;">



    <div  id="search" style="width:80%;padding-left:2%;padding-right:2%;text-align:center;float:left;margin-top:6px;">

        <form id="search_form" action="/home/task/index/id/<?php echo $id; ?>.html" name="keyform">
        <img class="search-img" src="/static/search_1.png" alt="" onclick="javascript:document.keyform.submit()">
            <input type="text" placeholder="任务ID、关键字、应用名称" value="<?php echo $keyword; ?>" style="height:37px;text-align:center;background-color: #1a1a1a;color:#fff;border-radius:20px;" name="keyword">
        </form>

    </div>
 
	<a href="/home/invite/weekly">
		
	    <div style="float:left;line-height:26px;height:26px;color:#fff;font-size:14px;text-align:center;width:18%;background:#2f62ff;border-radius:26px;margin-top:12px;">
	    	排行榜
	    </div>
	</a>   	
 

    </div>

    <div class="top-task2" >
        <ul class="zh-tab-tit" style="width:100%;">
            <!--<li id="all" style="margin-left:0%;margin-right:0%;width:25%;" onclick="set_type()">-->
            <!--	<span id="cate_name">-->
            		
            <!--	全部-->
            <!--	</span>-->
            <!--    <span class="up" style="font-size: 12px;">▲</span>-->
            <!--    <span class="down" style="display:none;font-size:12px;">▼</span>-->
            <!--</li>-->
     
            <li   <?php if($paixu == 2): ?> class="active" <?php endif; ?>  data-id='2' onclick="set_paixu(this)">最新发布</li>
            <li  <?php if($paixu == 3): ?> class="active" <?php endif; ?>  data-id='3' onclick="set_paixu(this)">佣金最高</li>
            <li  <?php if($paixu == 4): ?> class="active" <?php endif; ?>   data-id='4' onclick="set_paixu(this)">人气最高</li>
        </ul>
    </div>


    <input name="category_ids" id="category_ids" value="<?php echo (isset($category_ids) && ($category_ids !== '')?$category_ids:0); ?>" type="hidden">



<div class="down" onclick="hideDown()" style="display:none;position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.5);top:0;left:0;z-index: 10;z-index:11;" >
<div class="top-task3"  >
        <ul class="zh-tab-tit">
            <li  <?php if(in_array('',$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id=''> <span>全部</span></li>
            <li  <?php if(in_array(6,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='6'><span>下载</span></li>
            <li   <?php if(in_array(3,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='3'><span>关注</span></li>
            <li   <?php if(in_array(4,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='4'><span>绑卡</span></li>
            <li   <?php if(in_array(2,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='2'> <span>转发</span></li>
            <!--
            <li   <?php if(in_array(7,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='7'> 电商</li>
            -->
            <li  <?php if(in_array(8,$category_ids_arr)): ?> class="active" <?php endif; ?>  onclick="set_category(this)" data-id='8'> <span>投票</span></li>
            <li  <?php if(in_array(9,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='9'> <span>高价</span></li>
            <li  <?php if(in_array(10,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='10'><span>多天</span></li>
            <!--
            <li  <?php if(in_array(11,$category_ids_arr)): ?> class="active" <?php endif; ?> onclick="set_category(this)" data-id='11'> 注册</li>
            -->
            <div style="clear:both;"></div>
        </ul>
    </div>
</div>


<script>
var paixu='<?php echo (isset($paixu) && ($paixu !== '')?$paixu:0); ?>'
var type='<?php echo (isset($type) && ($type !== '')?$type:0); ?>';
var page=2;
var category_id='<?php echo (isset($category_id) && ($category_id !== '')?$category_id:0); ?>';

    function set_category(e){

    	page=1
        event.stopPropagation()
        var category_ids=$("#category_ids").val();
        var category_id=$(e).data('id')
   
    window.location.href="/home/task/index/page/1/category_ids/"+category_id
    return;
        if(category_ids){
            category_ids_arr=category_ids.split(',')
        }else{
            category_ids_arr=[];
        }

      
            let is_in=false;
            let index='';
            for(var i = 0; i < category_ids_arr.length; i++){
                if(category_id === category_ids_arr[i]){
                    index=i;
                   is_in=true;
                }
            }
            if(is_in){
                category_ids_arr.splice(index,1)
                $('#category_ids').val(category_ids.join(','))
            }else{
                $('#category_ids').val(category_ids +',' + category_id)
            }

        $(e).toggleClass('active')
    }


    function set_paixu(e){
    	page=1;
    	paixu=$(e).data('id');
    	$(e).siblings().removeClass('active')
    	$(e).addClass('active')
        pulldownRefresh()
        //location.href='/home/task/index/type/<?php echo (isset($type) && ($type !== '')?$type:'0'); ?>/category_ids/'+$('#category_ids').val()+'/paixu/'+val
    }

    function task_submit(){
    	page=1
    	set_type()
        pulldownRefresh()
        //location.href='/home/task/index/type/<?php echo (isset($type) && ($type !== '')?$type:'0'); ?>/category_ids/'+$('#category_ids').val()
    }
    function reset(){
    	page=1
        $('#category_ids').val(0);
        $('.top-task3 li').removeClass('active')
    }
</script>

<input type="hidden" name="cate" value="<?php echo $category_id; ?>" >
<!--<input type="hidden" name="paixu" value="<?php echo $paixu; ?>" >-->
<input type="hidden" name="keyword" value="<?php echo $keyword; ?>" >

<style>
    
    .index_list{padding:0px;}
.index_list li {
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 3px;
    position: relative;
    border: 0px solid #423b3b;
    background: #1a1a1a;
    width: 47%;
    display: inline-block;
    border-radius: 9px;
    margin-right:10px;
    margin-bottom: 10px;
}
.index_list li a.userlogo {
    display: block;
    padding-top: 0px;
    padding-bottom: 3px;
    width: 60px;
    position: absolute;
    left: 5px;
    top: 0px;
}
.index_list li .desc {
    color: #fff;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    margin-bottom: 0px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.index_list li a.title {
    padding-left: 60px;
    display: block;
}
.index_list li a.userlogo img {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 25px;
}
.index_list li a .subtitle {
    color: #fff;
    display: block;
    overflow: hidden;
    height: 26px;
    line-height: 39px;
}
</style>

<div class="content" id="wrapper">

  <div class="clear"></div>
    <?php if(!empty($tasks)): ?>
    <div class="list-block">
        <div  class="mui-content mui-scroll-wrapper" id="pullrefresh" style="left:0.1">
       
         
        <div class="index_list">
              <ul style="display:flex;align-items:center;flex-wrap:wrap;" id="lists">
                    <?php if(is_array($tasks) || $tasks instanceof \think\Collection || $tasks instanceof \think\Paginator): $k = 0; $__LIST__ = $tasks;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$task): $mod = ($k % 2 );++$k;?>
                    <li  style="height:120px;margin-right:10px;width:47%;margin-bottom:10px;border:none;">
                        
                    	<?php if($task['is_top']): ?>
                    	<img src="/static/home/mobile/images/tuijian.png" style="position:absolute;top:0px;left:0px;z-index:10;height:25px;width:25px;border-radius:5px 0 0 0 ">
                    	<?php endif; ?>
                        <a href="/home/task/detail/id/<?php echo $task['id']; ?>.html?xapp-target=blank" class="userlogo">
                        	
                        	<img src="<?php echo $task['avatar']; ?>" alt="">
                        	<?php if($task['is_vip']): ?>
                        	<img src="/static/home/mobile/images/vip2.png" style="position:absolute;bottom:2px;right:10px;z-index:10;height:16px;width:16px;">
                        	<?php endif; ?>
                        	
                        	
                        	</a>
                        <a href="/home/task/detail/id/<?php echo $task['id']; ?>.html?xapp-target=blank" class="title" style="margin-left:5px">
        
                            <div class="subtitle" ><?php echo $task['title']; ?><!--<span class="list-id-span">编号：<?php echo $task['id']; ?>--></span></div>
                         </a>
                         <div class="money" style="color:#FF2424;font-size: 12px;margin-left:5px;padding-left: 60px;">赏<?php echo $task['unit_price']; ?>元</div>
                           
                           <div class="keywords" style="width:100%;margin-top: 10px;background: #2b2727;">
                                <span class="yellow-new" style="color:#308CFC;"><?php echo $task['cataname']; ?></span>
                                <span class="blue-new" style="color:#308CFC;"> <?php if(!empty($task['appName'])): ?> <?php echo mb_substr($task['appName'],0,5); else: ?>应用名称<?php endif; ?></span>
                          </div>
                           <div class="desc" >
                              <span> <i style="color:#FF6B04;"> <?php echo abs($task['join_num']); ?></i>人已赚</span>　
                              <span style="">剩余<?php echo abs($task['ticket_num']-$task['join_num']); ?>份</span>
                            </div>
                    </li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
          </ul>
        </div>
   
        </div>
    </div>
    <div class="clear"></div>
    <?php endif; ?>
</div>
<style>
    #footer-bar li {
    width: 25%;
    float: left;
    
}
#footer-bar{background:#0d0d0d}
</style>

<footer id="footer-bar" lang="<?php echo $controller; ?>">
      <ul id="tabbar">
      <li><a href="/">
      <img src="/static/home/mobile/images/0011<?php if(in_array($controller,array('index'))): ?>_on<?php endif; ?>.png">
      <b>首页</b></a></li>
      <li><a href="/home/task/category.html"><img src="/static/home/mobile/images/0022<?php if(in_array($controller,array('task'))): ?>_on<?php endif; ?>.png"><b>大厅</b></a></li>

      <li><a href="/home/invite.html"><img src="/static/home/mobile/images/0044<?php if(in_array($controller,array('connection'))): ?>_on<?php endif; ?>.png"><b>推广</b></a></td>
      <li><a href="/home/account.html"><img src="/static/home/mobile/images/0055<?php if(in_array($controller,array('account','charge','fans','vip','feedback','feedback','notice','help'))): ?>_on<?php endif; ?>.png"><b>我的</b></a></li>
      </ul>
</footer>
<script>

  mui('body').on('tap','a',function(){document.location.href=this.href;});
    mui.init({
        pullRefresh: {
            container: '#pullrefresh',
            down: {
                 callback: pulldownRefresh
            },
            up: {
                 contentnomore:'没 有 更 多 数 据 了',
                contentrefresh: '正在加载...',
                callback: pullupRefresh
            }
        },
    });

    var count = 0;
    /**
     * 上拉加载具体业务实现
     */

    function pullupRefresh() {

               $.get('/home/task/index/id/<?php echo $id; ?>/page/'+page+'/category_ids/'+$('#category_ids').val()+'/type/'+type+'/category_id/'+category_id+'/paixu/'+paixu, function(res){

                    if(res){
                        page+=1;
                        $('#lists').append(res)
                        mui('#pullrefresh').pullRefresh().endPullupToRefresh();
                        if($('.zh-tab-tit').find('li').length>7){
                        
                        //	$('.top-task2').hide()
                        }
                    }else{
                        mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
                    //    mui('#pullrefresh').pullRefresh().endPulldown();
                    }
                    
               })
    }


    function pulldownRefresh(){
    			$('.top-task2').hide()
                $('#lists').html('')
                $('.mui-scroll').css('transform',"translate3d(0px, 0px, 0px) translateZ(0px)")
            $.get('/home/task/index/id/<?php echo $id; ?>/page/1/category_ids/'+$('#category_ids').val()+'/type/'+type+'/category_id/'+category_id+'/paixu/'+paixu, function(res){
					$('.top-task2').show()
                if(res){
                    page=2;
                        console.log(res)
                    $('#lists').html(res)
                    

                    mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //完成刷新
                }else{

                }

      　			document.getElementById('lists').scrollTop = 0;

               })
    }
</script>
<script>
    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                if(clientWidth>=640){
                    docEl.style.fontSize = '100px';
                }else{
                    docEl.style.fontSize = 100 * (clientWidth / 640) + 'px';
                }
            };
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>

<script>
    function set_type(){
        $('.down').toggle();
        $('.up').toggle();
    }
    $('.header-left').find('.left-itme').on('click', function(event) {
        event.stopPropagation();
        $(this).addClass('select-header').siblings().removeClass('select-header');
        var header_index = $(this).index();
     
    });

    $('.tab-item').find('.tab-title').on('click', function(event) {
        event.stopPropagation();
        if($(this).next().is(':hidden')){
            $(this).next().show();
        }else{
            $(this).next().hide();
        }
        $(this).parent().siblings().find('ul').hide();
    });

        $('.show-message').on('click',function (e){
            //e.preventDefault();

                mui.alert('为了让平台自身任务更多的曝光和展示，积分任务大厅将在9号下架，还在进行中的任务请尽快完成。','提示','确定',function (){window.location.href="http://zhongrenbang.net/Task/un7635557361166671?uid=<?php echo $uid; ?>"})
        })

/*    $(document).on('click', function(event) {
        $('.tab-list').hide();
    });*/
    $('.tab-list').find('li').on('click',function() {
        event.stopPropagation();
        $(this).addClass('tab-select').siblings().removeClass('tab-select');
        $(this).parent().hide();
        var li_index = $(this).index();
        
    });
	function hideDown(){
		console.log(222)
		window.event? window.event.cancelBubble = true : e.stopPropagation();
		set_type()
	}
	var cate_name=$('.top-task3').find('.active').text();
	$('#cate_name').text(cate_name)
	
	function gored(task_id){
		window.event? window.event.cancelBubble = true : e.stopPropagation();
		alert(task_id)
		location.href='/home/task/redpackage/task_id/'+task_id
	}
</script>
</div>
</body>
</html>